package com.gzz.orchid.context.application.base.convert;

import com.gzz.orchid.context.application.base.command.TagsSaveCmd;
import com.gzz.orchid.context.application.base.pojo.TagsDto;
import com.gzz.orchid.context.application.base.pojo.TagsVo;
import com.gzz.orchid.context.infrastructure.persistence.entity.base.BaseTagsPo;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

/**
 * @author higmd
 */
@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface TagsConverter {
    TagsConverter INSTANCE = Mappers.getMapper(TagsConverter.class);


    TagsVo mapVo(BaseTagsPo po);


    TagsDto mapDto(BaseTagsPo po);

    void updatePo(@MappingTarget BaseTagsPo po, TagsSaveCmd cmd);
}
